package com.april.pattern.behavioral.chainofresponsibility;

import org.junit.platform.commons.util.StringUtils;

/**
 * @author April
 * @version V1.0.0
 * @date 2019/07/09 17:07
 * @description
 */
public class VideoApprover extends Approver {
    @Override
    public void deploy(Course course) {
        if (StringUtils.isNotBlank(course.getVideo())) {
            System.out.println(course.getName() + "含有视频,批准");
            if (approver != null) {
                approver.deploy(course);
            }
        } else {
            System.out.println(course.getName() + "不含有视频,不批准,流程结束");
        }
    }
}
